package com.lebang.domain;

import com.lebang.entity.RequestHeaders;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * member_header_history
 * @author 
 */
@Data
@ApiModel("")
public class MemberHeaderHistory implements Serializable {
    /**
     * id
     */
    @ApiModelProperty("id")
    private Integer id;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    private LocalDateTime modifyTime;

    private String appId;

    private String appStore;

    private String brand;

    private String imei;

    private String lat;

    private String lng;

    private String macAddr;

    private String os;

    private String osv;

    private String memberId;

    private Integer version;

    private String ipAddr;

    private String ua;

    private String osVersion;

    private String oaId;

    private String androidId;

    private static final long serialVersionUID = 1L;

    public MemberHeaderHistory() {}

    public MemberHeaderHistory(RequestHeaders requestHeaders) {
        LocalDateTime now = LocalDateTime.now();
        this.createTime = now;
        this.modifyTime = now;
        this.appId = requestHeaders.getAppid();
        this.appStore = requestHeaders.getAppStore();
        this.brand = requestHeaders.getBrand();
        this.imei = requestHeaders.getImei();
        this.lat = requestHeaders.getLat();
        this.lng = requestHeaders.getLng();
        this.macAddr = requestHeaders.getMacAddr();
        this.os = requestHeaders.getOs();
        this.osv = requestHeaders.getOsv();
        this.memberId = requestHeaders.getUserid();
        this.version = requestHeaders.getVersionInt();
        this.ipAddr = requestHeaders.getIpAddr();
        this.ua = requestHeaders.getUa();
        this.osVersion = requestHeaders.getOsVersion();
        this.oaId = requestHeaders.getOaid();
        this.androidId = requestHeaders.getAndroid_id();
    }

}